
new Vue({
    // http:{
    //     root: 'http://bymadmin.me'
    // },

    data:{
        articleId : articleId,
        article:{},
        loading:false
    },

    mounted:function(){
        var self = this;
        self.loading = true;
        //获取文章详情
        var pResult = self.$http.get('/api/web-page/news-article/'+self.articleId).then(function(response){
            return response.json();
        }).catch(function(error){
            console.error(error);
        });

        pResult.then(function(data){
            if( data.code !== 0 ){
                throw new Error("请求文章内容错误，错误号是:"+data.code);
            }

            self.article = data.article;
            self.loading = false;
        });





    }

}).$mount('#article');
